package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee entity);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee entity);

    int query4Count(QueryObject qo);

    List<Employee> query4List(QueryObject qo);

    void changeState(Long id);

    void changePwd(@Param("password") String password,@Param("id") Long id);

    void deleteRoleByEmpId(Long id);

    void insertByRoleIdAndEmpId(@Param("roleId") Long roleId, @Param("employeeId") Long employeeId);

    Employee selectEmployeeByUsername(String username);

    /**
     * 查询员工列表信息.只有名字和id
     * @return 返回员工集合
     */
    List<Employee> listAll();
}